package com.taiji.webfluxcurd.domain;

import com.taiji.webfluxcurd.base.IBaseRepository;
import org.springframework.data.r2dbc.repository.Modifying;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Mono;

@Repository
public interface PrizeRepository extends IBaseRepository<Prize,String> {

    @Modifying
    @Query("insert into prize (id,name) values (:#{#prize.id},:#{#prize.name})")
    Mono<Prize> addPrize(Prize prize);
}
